﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestSystem.Ui.Forms
{
    public partial class GetToolForm : Form
    {
        public String Value
        {
            get { return textBoxText.Text; }
            set { textBoxText.Text = value; }
        }
        public String Description
        {
            get { return textBox1.Text; }
            set { textBox1.Text = value; }

        }

        public GetToolForm()
        {
            DialogResult = DialogResult.Cancel;
            InitializeComponent();
        }

        public DialogResult ShowDialog(String title, String message, String message2)
        {
            labelMessage.Text = message;
            Text = title;
            labelDescription.Text = message2;
            return ShowDialog();
        }
        public DialogResult ShowDialog(String title, String message, String message2, String name, String description)
        {
            labelMessage.Text = message;
            Text = title;
            labelDescription.Text = message2;
            textBoxText.Text = name;
            textBox1.Text = description;
            return ShowDialog();
        }

        private void OnCancelClick(object sender, EventArgs e)
        {
            Close();
        }


        private void OnOkClick(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
